import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { NavBar, Divider, Form, Search, Field, Tag, CellGroup, Button, Tabbar, TabbarItem, Icon, Tab, Tabs, Cell, List, PullRefresh, ActionSheet, Popup, Row, Col, Badge } from 'vant'
import directive from '@/utils/directive'

import 'amfe-flexible'

import { allChannelListAPI } from '@/api'
// 引入移动端适配插件import { Tag, CellGroup } from 'vant'

Vue.use(CellGroup)
Vue.use(Tag)
Vue.use(directive)
Vue.use(Search)
Vue.use(Divider)

Vue.use(Badge)
Vue.use(Row)
Vue.use(Col)

Vue.use(Popup)

Vue.use(ActionSheet)

Vue.use(PullRefresh)

Vue.use(List)

Vue.use(Cell)

Vue.use(Button)
Vue.use(Form)
Vue.use(Field)
Vue.use(NavBar)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(NavBar)
Vue.use(Icon)

Vue.use(Tab)
Vue.use(Tabs)

async function myFn () {
  try {
    const res = await allChannelListAPI()
    console.log(res) // 后台返回的频道数据
  } catch (err) {
    console.error(err)
  }
}
myFn()
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
